﻿using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProjectN.Core.Instance
{
    public static class Preservation
    {
        public static void SaveToFile(this Instance instance, string path)
        {
            if(File.Exists(path))
                File.Delete(path);
            ZipFile.CreateFromDirectory(instance.Directory.FullName, path, CompressionLevel.SmallestSize, false);
        }
    }
}
